package cn.hp.beauty.service.impl;

import cn.hp.beauty.domain.UserInfo;
import cn.hp.beauty.mapper.UserInfoMapper;
import cn.hp.beauty.service.UserInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserinfoServiceImpl implements UserInfoService {

    @Resource
    private UserInfoMapper userInfoMapper;

    @Override
    public List<UserInfo> findList(UserInfo userInfo) {

        return userInfoMapper.selectList(userInfo);
    }

    @Override
    public int insertUserinfo(UserInfo userInfo) {
        return userInfoMapper.insertSelective(userInfo);
    }

    @Override
    public int updateUserinfo(UserInfo userInfo) {
        return userInfoMapper.updateByPrimaryKeySelective(userInfo);
    }

    @Override
    public int deleteById(int id) {
        return userInfoMapper.deleteByPrimaryKey(id);
    }
}
